1. Technical Field
Embodiments described herein generally relate to processors. In particular, embodiments described herein generally relate to enforcing instruction order in out-of-order execution processors.
2. Background Information
Many modern processors are out-of-order (OoO) execution processors that are capable of executing instructions in an order that is different than the order in which the instructions appear the original software program. The term program order is often used to refer to the order of the instructions in the original software program. Instead of necessarily executing the instructions in the program order, the OoO execution processor may execute the instructions in an order that may depends on the availability of input data, as well as potentially various other factors. By way of example, some younger instructions may need input data from older instructions, while other younger instructions may not need input data from any older instructions.
OoO execution may allow the processor to immediately execute instructions that are ready without delay waiting on prior instructions that may themselves be unready to execute because they are waiting on data. The order in which the instructions are actually executed in the OoO execution processor is often referred to as data order. Subsequently, the OoO execution processor may re-order the execution results and/or architectural state and present the execution results and/or architectural state (e.g., to software, a user, etc.) in the original program order instead of in the data order in which the instructions were actually executed. Advantageously, such OoO execution processors generally have improved performance and/or speed due in part to increased utilization of pipeline stages or processing timeslots.
However, one challenge in OoO execution processors in certain situations is that problems may occur when a resource that should only be accessed in program order is accessed in data order as a result of out-of-order execution.